#pragma once
#ifndef NODESCENE_H
#define NODESCENE_H

#include <QGraphicsScene>
#include<QGraphicsScene>
#include<QVector>

#include"node_socket.h"
#include"node_item_base.h"
#include"opengl/node_opengl_test.h"

// UNUSE

class NodeScene : public QWidget
{
public:
    NodeScene(int index,QWidget *parent=nullptr);
    NodeScene(int index,int type,QWidget *parent=nullptr);
    NodeScene(const NodeScene &nodeScene,QWidget *parent=nullptr);
    void operator=(const NodeScene &nodeScene);
    ~NodeScene();
    void initSocket(int number_left,int number_right);
    void SetIndex(int n);
    void SetItemTitle(QString title);
    int GetSelectedSocetIndex();
    void DebugOutput();
    //void initNodeItem(int node_number);

    QString title;
    int index;
    int input_number;
    int output_number;


    //NodeItem *item;
    //NodeItemNumber *item;
    //NodeItemNumber *item;
    NodeItemBase *item;
    QVector<NodeSocket*> input;  // 输入输出
    QVector<NodeSocket*> output;



    //node data
};

class NodeSceneOutput : public QWidget
{
public:
    NodeSceneOutput(int index,QWidget *parent=nullptr);
    NodeSceneOutput(const NodeSceneOutput &nodeScene,QWidget *parent=nullptr);
    void operator=(const NodeSceneOutput &nodeScene);
    ~NodeSceneOutput();
    void initSocket(int number_left,int number_right);
    void SetIndex(int n);
    void SetItemTitle(QString title);
    int GetSelectedSocetIndex();

    QString title;
    int index;
    int input_number;
    int output_number;


    //NodeItem *item;
    //NodeItemNumber *item;
    NodeItemOutput *item;
    QVector<NodeSocket*> input;  // 输入输出
    QVector<NodeSocket*> output;



    //node data
};

#endif // NODESCENE_H
